package com.lyz.dz.des.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 聊天表
 * </p>
 *
 * @author <a href="https://fengwenyi.com">Erwin Feng</a>
 * @since 2021-08-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("chat")
public class ChatEntity extends Model<ChatEntity> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 送方发
     */
    @TableField("user_id_fa")
    private Integer userIdFa;

    /**
     * 接收方
     */
    @TableField("user_id_jie")
    private Integer userIdJie;

    /**
     * 容内
     */
    @TableField("content")
    private String content;

    /**
     * 片图
     */
    @TableField("image")
    private String image;

    /**
     * 建立时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 息消是否已查看，0:未查看，1:已查看
     */
    @TableField("is_look")
    private Integer isLook;

    /**
     * 发送方判断是否删除，0:未删除，1:删除
     */
    @TableField("is_remove_fa")
    private Integer isRemoveFa;

    /**
     * 接收方判断是否删除，0:未删除，1:删除
     */
    @TableField("is_remove_jie")
    private Integer isRemoveJie;

    /**
     * 聊天信号
     */
    @TableField("chat_signal")
    private String chatSignal;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
